#!/bin/bash
set -e

source $(dirname $0)/version

cd $(dirname $0)/..

mkdir -p bin
go build -ldflags \
	"-X main.Version=$VERSION \
	-X main.GitCommit=$GITCOMMIT \
	-X main.BuildDate=$BUILDDATE \
	-linkmode external -extldflags -static" \
	-o bin/longhorn-instance-manager
